# Main Makefile for Mike Griffiths iome application
# Copyright (C) 1996 Michael Kenneth Griffiths.

# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2, or (at your option)
# any later version.

# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU General Public License for more details.

# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.

SHELL = /bin/sh
top_srcdir = @top_srcdir@
srcdir = @srcdir@
VPATH = @srcdir@

.SUFFIXES:
.SUFFIXES: .cpp .o

OPT=-g -O

AR = ar
AR_FLAGS = rc
#RANLIB = @RANLIB@
CXX = @CXX@
CC = @CC@
CFLAGS = -I. @CFLAGS@
LDFLAGS = @LDFLAGS@
LIBS = @LIBS@
INSTALL = cp
prefix = @prefix@
exec_prefix = @exec_prefix@
bindir = $(exec_prefix)/bin
libdir = $(prefix)/lib
infodir = $(prefix)/info
simdir = ../simulation

EXTRACFLAGS = -I../../../include -DIO_XERCESCVERSION=@XERCESCVERSION@ -I../../../include -I$(XERCESCROOT)/include -I$(XALANCROOT)/src -I$(XALANCROOT) -I$(prefix)/include 
#EXTRALIB	=	-lm -L$(XERCESCROOT)/lib -L$(XALANCROOT)/lib -lxerces-c -lxalan-c -L$(prefix)/lib
MYLIBS = ../../../lib/libioutils.a ../../../lib/libiosimulation.a ../utils/IoFileUtils.o

simdir = ../simulation



SOURCES = IoGenericSimulationLib.cpp\
	$(simdir)/IoGenericSteerSimulation.cpp\
	$(simdir)/stdsoap2.cpp\
	$(simdir)/soapC.cpp\
	$(simdir)/soapClient.cpp

DOCS=PROG.texi PROG.info
MISC=configure mkinstalldirs install-sh aclocal.m4
OBJS = IoGenericSimulationLib.o\
	$(simdir)/IoGenericSteerSimulation.o\
	$(simdir)/stdsoap2.o\
	$(simdir)/soapC.o\
	$(simdir)/soapClient.o

LIB_OBJS=libiogenericsimulation.o

# ??? replace with your targets
all: libiogenericsimulation.a

# ??? here I make the bindir, libdir and infodir directories; you
# might not need all of these.  also, I assumed the names PROG and
# libiogenericsimulation.a for the program and library.
install: all
	mkdir -p $(bindir)
	mkdir -p $(libdir)
	mkdir -p $(infodir)
	$(INSTALL) libiogenericsimulation.a $(libdir)/libiogenericsimulation.a

uninstall:
	/bin/rm -f $(libdir)/libiogenericsimulation.a


libiogenericsimulation.a: $(OBJS)
	/bin/rm -f libiogenericsimulation.a
	$(AR) $(AR_FLAGS) libiogenericsimulation.a $(OBJS)

.cpp.o:
	$(CXX) $(CFLAGS) $(EXTRACFLAGS) -c $<

.c.o:
	$(CC) $(EXTRACFLAGS) $(CFLAGS) -c $<


PROG: $(OBJS) libMYPROG.a
	$(CC) $(CFLAGS) -o PROG $(OBJS) $(LIBS)

clean:
	/bin/rm -f core *.o $(OBJS) $(LIB_OBJS) libiogenericsimulation.a

distclean: clean
	/bin/rm -f Makefile config.h config.status config.cache config.log \
		marklib.dvi

mostlyclean: clean

maintainer-clean: clean

PROG.info: PROG.texi
	makeinfo PROG.texi

# automatic re-running of configure if the ocnfigure.in file has changed
#${srcdir}/configure: configure.in aclocal.m4
#	cd ${srcdir} && autoconf

# autoheader might not change config.h.in, so touch a stamp file
#${srcdir}/config.h.in: stamp-h.in
#${srcdir}/stamp-h.in: configure.in aclocal.m4
#		cd ${srcdir} && autoheader
#		echo timestamp > ${srcdir}/stamp-h.in

#config.h: stamp-h
#stamp-h: config.h.in config.status
#	./config.status
#Makefile: Makefile.in config.status
#	./config.status
#config.status: configure
#	./config.status --recheck

